fix: procd script cannot auto re-auth (procd脚本不能在掉线之后自动重新登录) #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修复了procd脚本:
docs/init.d/goauthing
的问题。之前的版本里,"deauth-auth-login"这个过程是通过
start_pre()
函数实现的:GoAuthing/docs/init.d/goauthing
Lines 10 to 14 in e42c2fd
然而,原来的版本却只把
start_pre()
写成了start_service()
中一次性调用的东西,而不是procd_set_param command
调用的内容,而只有后者才是procd的respwan
功能在进程退出时会去尝试重启的东西。GoAuthing/docs/init.d/goauthing
Lines 16 to 24 in e42c2fd
以下内容的测试环境为OpenWrt 23.05.2:
之前的的情况是:
command
参数中所设置的命令auth-thu online
进程auth-thu auth
命令恢复上线,所以网络还是处于不在线的状态。当然很快,online进程就又退出本PR尝试修复这个问题,通过把"deauth-auth-login-online"四步作为一个整体,以shell的方式传递给procd。这样如果online进程退出,procd在respwan时,就会再次尝试完整的"deauth-auth-login-online"四步过程,而不是反复地尝试online。